import http from '@/design/libs/request/request'
const BASE_URL = '/operation'

export default {
  // 获取列表数据
  list: data => http.post(BASE_URL + '/list', data),
  // 创建数据
  create: data => http.post(BASE_URL + '/create', data),
  // 获取数据
  fetch: (id) => http.post(BASE_URL + '/fetch/' + id),
  // 更新数据
  update: data => http.post(BASE_URL + '/update', data),
  // 删除单个
  delete: (id) => http.post(BASE_URL + '/delete/' + id),
  // 删除集合
  del: data => http.post(BASE_URL + '/delete', data),
  // 更新状态
  disable: data => http.post(BASE_URL + '/disable', data),
  // 排序数据
  sort: data => http.post(BASE_URL + '/sort', data),
  // 同步数据
  synchro: data => http.post(BASE_URL + '/synchro', data),
  // 保存申请表单
  save: data => http.post(BASE_URL + '/save', data),
  // 提交申请表单
  submit: data => http.post(BASE_URL + '/submit', data),
  // 获取部门列表
  deptList: data => http.post(BASE_URL + '/deptList', data),
  // 获取厂商名称
  firmName: data => http.post(BASE_URL + '/firmName', data),
  // 获取部门信息
  deptInfo: data => http.post(BASE_URL + '/deptInfo', data),
  // 获取楼层列表
  floors: data => http.post(BASE_URL + '/floors', data),
  // 厂商合同信息
  fcInfos: data => http.post(BASE_URL + '/fcInfos', data),
  // 人员信息
  applicant: data => http.post(BASE_URL + '/applicant', data),
  // 作废表单
  abate: data => http.post(BASE_URL + '/abate', data),
  // 部门
  departments: data => http.post(BASE_URL + '/departments', data),
  // 获取合同信息
  queryht: data => http.post(BASE_URL + '/queryht', data),
  // 获取某部门下所有专柜
  zgdatas: data => http.post(BASE_URL + '/zgdatas', data),
  // 根据合同时间算合约年
  datedetails: data => http.post(BASE_URL + '/datedetails', data),
  // 根据合同时间和第一个合约年结束时间算合约年
  datedetailswithfirstendday: data => http.post(BASE_URL + '/datedetailswithfirstendday', data),
  // 营业销售额分解表计算
  // yyxsedetails: data => http.post(BASE_URL + '/yyxsedetails', data),
  // 营业毛利额分解表计算
  // yymldetails: data => http.post(BASE_URL + '/yymldetails', data),
  // 获取扣款项目
  deductionsbychoosetype: data => http.post(BASE_URL + '/deductionsbychoosetype', data),
  // 复制扣款项目
  copydeductionsbychoosetype: data => http.post(BASE_URL + '/copydeductionsbychoosetype', data),
  // 根据厂商关键字获取厂商列表
  firmlist: (firmKeyWord) => http.post(BASE_URL + '/firmlist/' + firmKeyWord),
  // 根据厂商编号获取厂商信息
  firmbyfirmcode: (firmCode) => http.post(BASE_URL + '/firmbyfirmcode/' + firmCode),
  // 获取分解
  fjdetails: data => http.post(BASE_URL + '/fjdetails', data),
  // 获取呈报信息
  operationFormData: data => http.post(BASE_URL + '/operationformdata', data),
  // 重新生成呈报电子合同
  operationagain: data => http.post(BASE_URL + '/operationagain', data),
  //  扣款
  deductionlistbychoosetype: (choosetype) => http.post(BASE_URL + '/deductionlistbychoosetype/' + choosetype),
  // 获取有单位扣款列表
  kkfyList: data => http.post(BASE_URL + '/kkfyList', data)
}
